package cn.interestingshop.dao;

import java.util.List;

import cn.interestingshop.entity.Goods;
import cn.interestingshop.entity.vo.GoodsVO;
import org.apache.ibatis.annotations.Param;

/**
 * 商品查询Dao
 *
 * deleteById(Integer id)
 * getById(Integer id)
 * getRowCount(params)
 * getRowList(params)
 *
 */
public interface GoodsDao {

	Integer updateStock(@Param("id") Integer id,
	                    @Param("buyNum") Integer buyNum) throws Exception;
	
	public Integer save(Goods goods) throws Exception;

	public Integer update(Goods goods) throws Exception;
	
	public Integer deleteById(Integer id) throws Exception;
	
	public Goods selectById(Integer id)throws Exception;
	
	public List<Goods> selectList(GoodsVO vo)throws Exception;
	
	public Integer selectCount(@Param("goodsName") String goodsName,
	                           @Param("categoryId")Integer categoryId)throws Exception;
}
